/*
 * sl_errors.h
 *
 *  Created on: Apr 18, 2016
 *      Author: root
 */

#ifndef SL_ERRORS_H_
#define SL_ERRORS_H_

enum{
	SL_OK		= 0,
	SL_NOERROR	= 0,
	SL_UNKNOWN_ERROR		= (-2147483647-1), // INT32_MIN value
	SL_NO_MEMORY			= -12, //-ENOMEM,
	SL_INVALID_OPERATION	= -38, //-ENOSYS,
	SL_BAD_VALUE			= -22, //-EINVAL,
	SL_BAD_TYPE				= (SL_UNKNOWN_ERROR + 1),
	SL_BAD_PARAM			= (SL_UNKNOWN_ERROR + 3),
	SL_NAME_NOT_FOUND		= -2, //-ENOENT,
	SL_PERMISSION_DENIED	= -1, //-EPERM,
	SL_NO_INIT				= -19, //-ENODEV,
	SL_ALREADY_EXISTS		= -17, //-EEXIST,
	SL_DEAD_OBJECT			= -32, //-EPIPE,
	SL_FAILED_TRANSACTION	= (SL_UNKNOWN_ERROR + 2),
	SL_JPARKS_BROKE_IT		= -32, //-EPIPE,
	SL_EBUSY				= -16, //-EBUSY
	SL_TIMEDOUT				= -110, //-ETIMEDOUT
	SL_EAGAIN				= -11, //-EAGAIN
	SL_EOF					= (SL_UNKNOWN_ERROR + 4),
};

#define SL_CONN_NETUNREACH		101 //ENETUNREACH
#define SL_CONN_HOSTUNREACH		103 //EHOSTUNREACH
#define SL_CONN_TIMEDOUT		110 //ETIMEDOUT
#define SL_CONN_REFUSED			111 //ECONNREFUSED


#endif /* SL_ERRNO_H_ */
